<?php $i = -1 ?>
<div id="top_nav">
    <ul>        
        <?php foreach($this->items as $item): ?>
        <?php $i++ ?>
        <?php if( !$item['hide'] ) : ?>
        <li><a class="<?php if($i==$this->index) echo 'selected'?>" href="<?php echo $item['link'] ?>"><?php echo $item['label'] ?></a></li>
        <?php endif ?>
        <?php endforeach ?>       
    </ul>
</div>
